package com.example.hzzrpcclient.config;

import com.example.hzzrpcclient.config.netty.NettyMainClient;
import com.example.hzzrpcclient.config.registercenter.RedisRegisterCenter;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author ：hzz
 * @description：TODO
 * @date ：2022/1/2 21:24
 */
@AutoConfigureAfter(RedisAutoConfiguration.class)
@Configuration
public class RpcClientAutoConfig {

    @Bean
    public NettyMainClient nettyMainClient(){
        NettyMainClient nettyMainClient = new NettyMainClient();
        nettyMainClient.getclients();
        return nettyMainClient;
    }

    @Bean
    public RedisRegisterCenter redisRegisterCenter(){
        return new RedisRegisterCenter();
    }
}
